import { CacheEnv } from "../utils/cache";


export const config: IAppConfig = {
  dev: {
    desc: "开发环境",
    baseUrl: "xxx",  
    assetsBaseUrl: "@/assets/",
    mockBaseUrl: "http://localhost:9527"
  },
  test: {
    desc: "测试环境",
    baseUrl: "xxx",  
    assetsBaseUrl: "/assets/"
  },
  prod: {
    desc: "生产环境",
    baseUrl: "xxxx",  
    assetsBaseUrl: "/assets/"
  },
};

// const { miniProgram } = uni.getAccountInfoSync() 
// export const envVersion = miniProgram.envVersion
export const envVersion = 'release'
export const env = process.env.NODE_ENV === 'development' ? 'dev': envVersion == 'release'? 'prod' :(CacheEnv.get() || 'test') as EnvType;
export const isDev = env === "dev";
console.log(`当前环境>>>>>> ${env} >>>>>>`, config[env]);
export default config[env];
